{% extends "blog/base.html" %}
{% block title %}分享一个好文章{% endblock %}

{% block content %}
{% if sent %}
<h1>邮件发送</h1>
<p>
    "{{ post.title  }}" was successfully send to {{ form.cleaned_data.to }}
</p>
{% else %}
<h1>share "{{ post.title }} by e-mail</h1>
<form action="." method="post">
    {{ form.as_p }}

    {% csrf_token %}
    <input type="submit" value="发送电邮" >
</form>
{% endif %}
{% endblock %}